import win32api
import win32con
import win32gui
import win32print

if __name__ == '__main__':
    hDC = win32gui.GetDC(0)
    _val = round(win32print.GetDeviceCaps(hDC, win32con.DESKTOPHORZRES) / \
                 win32api.GetSystemMetrics(win32con.SM_CXSCREEN), 2)
    with open("ratio.ini", "w") as f:
        f.write(str(_val))
